package com.wipz.eoa.iphone.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * ���÷�����
 * 
 * @author mamingjie
 * @date 2012-2-31����03:13:43
 * @version 1.0
 */
public class Constants {
	// ���ҵ�񵥾�CODE����
	public static final String NEWS = "NP"; // ֪ͨ����
	public static final String REGULAR_EXPENSES = "RE"; // ���÷��÷��ñ���
	public static final String COST_TRAVEL_REIMBURS = "TR";
	public static final String WORKENTRUST = "WT"; // ����ί��
	public static final String RECEIVEDOCUMENT = "RD"; // ���Ĺ���
	public static final String SENDDOCUMENT = "SD"; // ���Ĺ���
	public static final String MYSHEDULE = "MS"; // �ճ̹���
	public static final String OFFICESUPLIES = "OS"; // �칫��Ʒ
	public static final String ASSET = "AS"; // �̶��ʲ�
	public static final String SEAL_APPLY = "SA"; //ӡ�¹���
	public static final String LEASE = "LA"; //���޹���
	public static final String USERINFO_USERCODE = "USERINFO_USERCODE";
	
	//begin 2011-08-12 by heyang for add ������ҵ������ID
	/**
	 * ����ί��:WORKENTRUST_BUSINESS_ID
	 */
	public static final String WORKENTRUST_BUSINESS_ID = "00000000000000000251474378549092";
	
	/**
	 * ��ӡ����:SEALAPPLY_BUSINESS_ID
	 */
	public static final String SEALAPPLY_BUSINESS_ID = "00000000000000000648361772152984";
	
	/**
	 * ֪ͨ���棺PUBLICNEWS_BUSINESS_ID
	 */
	public static final String PUBLICNEWS_BUSINESS_ID = "00000000000000000251474378549091";
	
	/**
	 * ���ģ�RECEIVEDOCUMENT_BUSINESS_ID
	 */
	public static final String RECEIVEDOCUMENT_BUSINESS_ID = "00000000000000000251474378549097";
	
	/**
	 * ���ģ�SENDDOCUMENT_BUSINESS_ID
	 */
	public static final String SENDDOCUMENT_BUSINESS_ID = "00000000000000000251474378549098";
	
	/**
	 * �칫��Ʒ���룺OFFICESUPPLIESAPPLY_BUSINESS_ID
	 */
	public static final String OFFICESUPPLIESAPPLY_BUSINESS_ID = "00000000000000000251474378549093";
	
	/**
	 * �칫��Ʒ�黹���룺OFFICESUPPLIESBACKAPPLY_BUSINESS_ID
	 */
	public static final String OFFICESUPPLIESBACKAPPLY_BUSINESS_ID = "00000000000000000493206753736259";
	
	/**
	 * �ʲ�ɹ����룺ASSETSPURCHASEAPPLY_BUSINESS_ID
	 */
	public static final String ASSETSPURCHASEAPPLY_BUSINESS_ID = "00000000000000000251474378549094";
	
	/**
	 * �ʲ�ά�����룺ASSETSREPAIRAPPLY_BUSINESS_ID
	 */
	public static final String ASSETSREPAIRAPPLY_BUSINESS_ID = "00000000000000000251474378549095";
	
	/**
	 * �ʲ�����룺ASSETSSCRAPAPPLY_BUSINESS_ID
	 */
	public static final String ASSETSSCRAPAPPLY_BUSINESS_ID = "00000000000000000251474378549096";
	
	/**
	 * �ɹ�����PURCHASEREIMBURSEMENT_BUSINESS_ID
	 */
	public static final String PURCHASEREIMBURSEMENT_BUSINESS_ID = "00000000000000000251474378549101";
	
	/**
	 * �ճ�����DAILYREIMBURSEMENT_BUSINESS_ID
	 */
	public static final String DAILYREIMBURSEMENT_BUSINESS_ID = "00000000000000000251474378549099";
	
	/**
	 * ���ñ���DAILYREIMBURSEMENT_BUSINESS_ID
	 */
	public static final String TRAVELREIMBURSEMENT_BUSINESS_ID = "00000000000000000251474378549100";
	//end 2011-08-12 by heyang for add ������ҵ������ID
	

	// ��ɶ�Ӧҵ�񵥾ݱ��
	public static final String getBillCode(String Code) {
		String code = "";
		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmSSS");
		code = Code + sdf.format(new Date());
		return code;
	}
	
	// ��ɶ�Ӧҵ�񵥾ݱ��
	public static final String getRandomCode(String Code) {
		StringBuffer code = new StringBuffer();
		code.append(Code);
		code.append(new SimpleDateFormat("yyMMddHHmmssSSS").format(new Date()));
		return code.toString();
	} 

	public static enum PROCESS_STATUS {
		/**
		 * δ�ύ
		 */
		NO_SUBMIT("δ�ύ", 0),
		/**
		 * ������
		 */
		APPROVAL("������", 1),
		/**
		 * �������
		 */
		ENDED("�������", 2),
		/**
		 * �쳣��ֹ
		 */
		ABNORMAL("�쳣��ֹ", 3),
		/**
		 * �˻�
		 */
		REJECTED("�˻�", 4);

		private final int value;
		private final String name;

		public int getValue() {
			return value;
		}

		public String getName() {
			return name;
		}

		public static String getName(int value) {
			switch (value) {
			case 0:
				return NO_SUBMIT.name;
			case 1:
				return APPROVAL.name;
			case 2:
				return ENDED.name;
			case 3:
				return ABNORMAL.name;
			case 4:
				return REJECTED.name;
			default:
				return "����";
			}
		}

		PROCESS_STATUS(String name, int value) {
			this.value = value;
			this.name = name;
		}
	}
	
}
